Ref

interface Ref<out T : Any>

A reference to an object that may change.

This is the base class used to access a backend object with an associated observer notified each time this associated object changes.

Associated object may be null it the corresponding backend object doesn't exists yet or has been removed. Observer is notified when the backend object is created or removed, and when the ref is created if the backend object exists.

Types

Link copied to clipboard
fun interface Observer<in T : Any>

Observer notified when the referenced changes.

Functions

Link copied to clipboard
abstract fun close()

Closes the ref.

Link copied to clipboard
abstract fun get(): T?